﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SN.UserControl
{
    public partial class frmPasteSpecial : Form
    {
        public CellControl CurControl;
        public int gPasteType;
        public frmPasteSpecial()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            //0 全部粘贴 
            //1 只粘贴公式 
            //2 只粘贴文本和数值 
            //3 只粘贴单元格格式 
            int a, b;
            a = Convert.ToInt16(chkSamePaste.Checked);
            b = Convert.ToInt16(chkSkipBlankCell.Checked);
            CurControl.axCell.Paste(CurControl.axCell.GetCurrentCol(), CurControl.axCell.GetCurrentRow(), gPasteType, a, b);

            this.Close();
        }

        private void frmPasteSpecial_Load(object sender, EventArgs e)
        {
            radioButton1.Checked = true;
            chkSamePaste.Checked = true;
            gPasteType = 0;
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            gPasteType = 3;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            gPasteType = 2;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            gPasteType = 1;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            gPasteType = 0; //全部
        }


    }
}
